package ltd.dujiabao.performance.monitor.demo.controller;

import java.util.concurrent.TimeUnit;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import ltd.dujiabao.performance.monitor.pm.collector.PerformanceCollect;

/**
 * @author : DuJiabao
 * @Project : performance_monitor
 * @Time : 2022/2/27 19:21
 * @Desc :
 */
@RestController
@RequestMapping("/pm")
public class DemoController {

    @PerformanceCollect
    @RequestMapping("/demo")
    public String demo() {
        // TODO: 随机数
        try {
            TimeUnit.SECONDS.sleep(1);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "demo";
    }
}
